
' VBScript to kill a program
public Function KillProcess()    
    Dim objWMIService, objProcess, colProcess
    Dim strComputer 
    strComputer = "."
    dim strProcessProvenanceKill, strProcessWFKill
    strProcessProvenanceKill = "'TridentProvenanceTray.exe'" 
    strProcessWFKill = "'TridentExecutorTray.exe'"
    
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _ 
    & strComputer & "\root\cimv2") 
    
    Set colProcess1 = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = " & strProcessProvenanceKill )
    For Each objProcess in colProcess1
    objProcess.Terminate()   
    Next

    Set colProcess2 = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = " & strProcessWFKill )
    For Each objProcess in colProcess2
    objProcess.Terminate()
    Next 
end function

public Function LaunchBrowserVB()
    dim Shell
    set Shell = CreateObject ("Wscript.Shell")
    Shell.Run ("http://msdn.microsoft.com/en-us/netframework/default.aspx")
end function
